package cn.tsmchina.one.service.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.tsmchina.one.dao.config.ConfigDao;
import cn.tsmchina.one.domain.config.Config;

/** 
 * 
 * @author locoroco.rao
 * @date   2013-10-29
 * Copyright: Copyright (c) 2013 TSM,Inc
 */

@Service
public class ConfigServiceImpl implements ConfigService {
	@Autowired
	private ConfigDao configDao;

	@Override
	public Config getConfig(long customerId, String configKey) {
		return configDao.getConfig(customerId, configKey);
	}

	@Override
	public int updateConfig(int configId, String imagePath) {
		return configDao.updateIndexImage(configId, imagePath);
	}
	
	@Override
	public int addConfig(long customerId, String imagePath, String configKey) {
		return configDao.addIndexImage(customerId, imagePath, configKey);
	}
}
